﻿Imports System.Diagnostics
Imports NLog
Imports System.Windows.Forms

Module mMain
    Dim ktor As New cKtor

    Public Sub main()


        Console.Title = ""
        Console.WriteLine("")
        Console.WriteLine("   ___  ____  _________    ___   _______     ")
        Console.WriteLine("  |_  ||_  _||  _   _  | .'   `.|_   __ \    ")
        Console.WriteLine("    | |_/ /  |_/ | | \_|/  .-.  \ | |__) |   ")
        Console.WriteLine("    |  __'.      | |    | |   | | |  __ /    ")
        Console.WriteLine("   _| |  \ \_   _| |_   \  `-'  /_| |  \ \_  ")
        Console.WriteLine("  |____||____| |_____|   `.___.'|____| |___| ... Silkroad Proxy")
        Console.WriteLine("")
        Console.WriteLine("")
        'Console.WriteLine("Command, &HLine Options:")
        'Console.WriteLine(" , &HProxy|ServerIP|ServerPort|ClientPort|BotPort")
        'Console.WriteLine(" , &HReplay|ClientPort|LogfilePath|BotPort")

        ktor.Start()

        Do
            If Console.ReadLine = "k" Then
                killsro()
            End If
        Loop


    End Sub
  
    Sub killsro()
        Dim p As Process() = Process.GetProcesses()
        For Each pr As Process In p
            If pr.ProcessName() = "sro_client" Then
                pr.Kill()
            End If
        Next
    End Sub

End Module
